package com.fxhy.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baby.bean.AgentRechargeInfo;
import com.baby.utils.DateUtils;
import com.fxhy.mapper.AgentRechargeMapper;

@Service
public class AgentRechargeService {
	
	@Autowired
	private AgentRechargeMapper  agentRechargeMapper;

	public List<AgentRechargeInfo> findRechargeData(Integer agentId, Integer userId) {
		return agentRechargeMapper.findRechargeData(agentId,userId);
	}

	public List<AgentRechargeInfo> findRechargeByDate(Integer agentId, String dateStr) {
		if(dateStr == null || dateStr.equals("")){
			dateStr = DateUtils.getNowDate().substring(0,8);
		}
		return agentRechargeMapper.findRechargeByDate(agentId,dateStr);
	}
}
